package com.glut.forum.common.aop;

import com.glut.forum.common.beans.ResultBean;
import lombok.extern.slf4j.Slf4j;

import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Pointcut;
import org.springframework.stereotype.Component;

/**
 * @Description Controller AOP 处理异常并打印调用日志。
 * @Date 2020/12/20
 * @Author 晓风轻 https://github.com/xwjie
 */
@Aspect
@Component
@Slf4j
public class ResultBeanControllerAOP extends ControllerAOP {

    @Override
    @Pointcut("execution(public com.glut.forum.common.beans.ResultBean *(..)))")
    public void targetMethod() {
    }

    @Override
    protected IErrorMsg createResult() {
        return new ResultBean<>();
    }
}
